home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIContentViewer.idl < prev    next >
Text File  |  2006-05-08  |  3KB  |  99 lines

  1. #include "nsISupports.idl"
  2.  
  3. interface nsIDOMDocument;
  4. interface nsISHEntry;
  5.  
  6.  
  7. %{ C++
  8. class nsIWidget;
  9. class nsIDeviceContext;
  10. struct nsRect;
  11. %}
  12.  
  13. [ptr] native nsIWidgetPtr(nsIWidget);
  14. [ptr] native nsIDeviceContextPtr(nsIDeviceContext);
  15. [ref] native nsRectRef(nsRect);
  16.  
  17. [scriptable, uuid(6a7ddb40-8a9e-4576-8ad1-71c5641d8780)]
  18. interface nsIContentViewer : nsISupports
  19. {
  20.  
  21.   [noscript] void init(in nsIWidgetPtr aParentWidget,
  22.                        in nsIDeviceContextPtr aDeviceContext,
  23.                        [const] in nsRectRef aBounds);
  24.  
  25.   attribute nsISupports container;
  26.  
  27.   void loadStart(in nsISupports aDoc);
  28.   void loadComplete(in unsigned long aStatus);
  29.   boolean permitUnload();
  30.   void pageHide(in boolean isUnload);
  31.  
  32.   /**
  33.    * All users of a content viewer are responsible for calling both
  34.    * close() and destroy(), in that order. 
  35.    *
  36.    * close() should be called when the load of a new page for the next
  37.    * content viewer begins, and destroy() should be called when the next
  38.    * content viewer replaces this one.
  39.    *
  40.    * |historyEntry| sets the session history entry for the content viewer.  If
  41.    * this is null, then Destroy() will be called on the document by close().
  42.    * If it is non-null, the document will not be destroyed, and the following
  43.    * actions will happen when destroy() is called (*):
  44.    *  - Sanitize() will be called on the viewer's document
  45.    *  - The content viewer will set the contentViewer property on the
  46.    *    history entry, and release its reference (ownership reversal).
  47.    *  - hide() will be called, and no further destruction will happen.
  48.    *
  49.    *  (*) unless the document is currently being printed, in which case
  50.    *      it will never be saved in session history.
  51.    *
  52.    */
  53.   void close(in nsISHEntry historyEntry);
  54.   void destroy();
  55.  
  56.   void stop();
  57.  
  58.   attribute nsIDOMDocument DOMDocument;
  59.  
  60.   [noscript] void getBounds(in nsRectRef aBounds);
  61.   [noscript] void setBounds([const] in nsRectRef aBounds);
  62.  
  63.   /**
  64.    * The previous content viewer, which has been |close|d but not
  65.    * |destroy|ed.
  66.    */
  67.   [noscript] attribute nsIContentViewer previousViewer;
  68.  
  69.   void move(in long aX, in long aY);
  70.  
  71.   void show();
  72.   void hide();
  73.  
  74.   attribute boolean enableRendering;
  75.  
  76.   attribute boolean sticky;
  77.  
  78.   /*
  79.    * This is called when the DOM window wants to be closed.  Returns true
  80.    * if the window can close immediately.  Otherwise, returns false and will
  81.    * close the DOM window as soon as practical.
  82.    */
  83.  
  84.   boolean requestWindowClose();
  85.  
  86.   /**
  87.    * Attach the content viewer to its DOM window and docshell.
  88.    * @param aState A state object that might be useful in attaching the DOM
  89.    *               window.
  90.    */
  91.   void open(in nsISupports aState);
  92.  
  93.   /**
  94.    * Clears the current history entry.  This is used if we need to clear out
  95.    * the saved presentation state.
  96.    */
  97.   void clearHistoryEntry();
  98. };
  99.